/**
 * Company
 * Copyright (C) 2004-2018 All Rights Reserved.
 */
package com.idefav.springdemo2.ioc.basic.beans.annonation;

import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.DependsOn;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

/**
 * @author wuzishu
 * @version $Id Demo1.java, v 0.1 2018-07-22 上午10:42 wuzishu Exp $$
 */
@Data
@Component
public class Demo1 {

    @Value("${name}")
    private String name;


    @Autowired
    private Demo2 demo2;



    public Demo1() {
        System.out.println("init demo1");
    }


    public Demo1(String name) {
        this.name = name;
        System.out.println("init demo1 with name");
    }
}
